package com.demo.spring.boot.config.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;

@RestController
public class IndexController {


    @RequestMapping("/index")
    public Object index() {
        Map<String, Object> map = new HashMap<>();
        map.put("id", UUID.randomUUID().toString().replace("-", ""));
        map.put("time", new Date());
        return map;
    }

}
